#include "sample.h"

#include <utility>

bool sample::is_triangle(int a, int b, int c) {
  if (a <= 0 || b <= 0 || c <= 0) return false;

  // set order as a <= b <= c
  if (a > b) {
    std::swap(a, b);
  }

  if (b > c) {
    std::swap(b, c);
  }

  return a + b > c;
}
